/**
 * 输入代码自动完成..
 * @param jqobj jq 对象
 */
function codeAutoComplete(id) {
	var jqobj = $("#"+id);
	jqobj.autocomplete(
			{
				minLength:3,
				source :"product/product!searchall",
				focus : function(event, ui) {
					jqobj.val(ui.item.code);
					return false;
				},
				select : function(event, ui) {
					var pdt  =ui.item;	
					if(productAutoComplateCallback && typeof(productAutoComplateCallback)=='function')
						productAutoComplateCallback(pdt);
					return false;
				}

			}).data("autocomplete")._renderItem = function(ul, item) {
		return $("<li></li>").data("item.autocomplete", item).append(
				"<a>" + item.code + "|" + item.name + "</a>").appendTo(ul);
	};
}